package engine.logic.login
{
	/**
	 * 延迟调用。
	 * 调用时机为条件充足时
	 * @author guyi
	 */	
	public class LoginCallLater
	{
		static public const MainIniReady:uint=0x01;//00000001;
		static public const LoginLogicReady:uint=0x02//00000010;
		static public const ConfigDataReady:uint=0x04;//00000100;
		static public const UiResReady:uint=0x08;//00001000;
		static public const GuideSceneReady:uint=0x16;//00010000;
		static public const AllReady:uint=0x32;//00100000;
		
		static public var AllSwfReady:Boolean=false;
		
		static private var _nxCallLater:NxCallLater; 
			
		/**
		 * 延迟调用 
		 * @param condition
		 * @param oper
		 * @param param
		 * 
		 */		
		static public function callLater(condition:uint,oper:Function,param:Object=null):void
		{
			nxCallLater.callLater(condition,oper,param);
		}
		
		/**
		 * 条件准备好 
		 * @param condition
		 * 
		 */		
		static public function setReady(condition:uint):void
		{
			nxCallLater.setReady(condition);
		}
		
		/**
		 * 条件置空 
		 * @param condition
		 * 
		 */		
		static public function setZero(condition:uint):void
		{
			nxCallLater.setZero(condition)
		}
		
		static private function get nxCallLater():NxCallLater
		{
			if(	null	==	_nxCallLater)
				_nxCallLater=new NxCallLater();
			
			return _nxCallLater;
		}
	}
}